package edu.sctu.zhuyingzhi.month201505.day20150531.subwayProject;

/**
 * Created by user12 on 2015/5/31.
 */
public class TicketMachine {

    MetroStation metroStation = new MetroStation();

    public void getNumber(SubwayCard subwayCard) {


        int stationNumber = Math.abs(metroStation.MetroStation().get(subwayCard.inStation) - metroStation.MetroStation().get(subwayCard.outStation));

        switch (stationNumber) {
            case 1:
            case 2:
            case 3:
                System.out.println("请支付2元");
                break;
            case 4:
            case 5:
            case 6:
                System.out.println("请支付4元");
                break;
            case 7:
            case 8:
                System.out.println("请支付5元");
                break;
            default:
                System.out.println("请支付6元");
                break;
        }
    }
}
